home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / AVOGADRO / SCIDISCS / DISC2 / GREENING.SPK / BigNumbers / Mersenne / ReadMersen < prev   
Text File  |  1991-12-13  |  3KB  |  49 lines

  1.                                     MERSENNE
  2.  
  3.                                  John Greening
  4.  
  5. (These programs may be freely copied provided that this file is attached and they are not sold for profit. They are used entirely at your own risk).
  6.  
  7. Mersenne numbers are of the form 2^n-1 and are named after a 17th century    French theologian who included mathematics in his many interests. Over many  years the largest known current prime number has usually been a Mersenne     number. This is not because they are particularly fruitful as a source of    primes but because it is easier to check their primality than that of most   other numbers. One necessary but not sufficient requirement is that the powern is itself a prime.
  8.  
  9. The programs in this directory avoid the use of strings so they are not      necessarily limited to integers of less than 256 digits - a restriction that must be avoided when dealing with many Mersenne numbers.
  10.  
  11. MersenneA
  12.  
  13. If your printer is switched on this program will print out all the Mersenne  numbers with prime powers of 2 up to 89 and the next three Mersenne primes.  These have powers 107, 127 and 521. If you only want a print out to the      screen you MUST delete the line containing VDU 2.
  14.  
  15. Mersenne1
  16.  
  17. In this program the arrays are such that only n up to 847 is possible, ie.   numbers with up to 256 digits.
  18.  
  19. Mersenne2
  20.  
  21. Here the arrays are extended so that you can calculate 2^4253-1, the first   known prime with more than 1000 digits. (It has 1281 of them).
  22.  
  23. Mersenne3
  24.  
  25. The arrays are extended again to calculate 2^8191-1 which was at one time,   incorrectly, thought to be prime. (2466 digits).
  26.  
  27. Mersenne4
  28.  
  29. With this you can get 2^8472-1 which has no special interest except that if  you wait long enough it will need to use all 32 lines of your screen at 80   digits per line to print out.
  30.  
  31. Note: When calculating a Mersenne number with the programs Mersenne 1 to 4   choose the one with the lowest limit for n (the power of 2) that is yet      greater than the n of the number you want. The smaller the number of arrays  the faster the calculation.
  32.  
  33. LucasTest
  34.  
  35. The Lucas-Lehmer test is the reason Mersenne numbers are prime favourites. Inthis program it checks the primality of all the Mersenne numbers calculated  in MersenneA, except for n=521, and shows the time needed for this check.
  36.  
  37. LucasTest5
  38.  
  39. Here you can test any Mersenne number up to 2^847-1. After n=127 the next    Mersenne prime has n=521. The check takes just over 8 minutes with ARM3      fitted.
  40. The next prime has n=607.
  41.  
  42. LucasTest7
  43.  
  44. In case you think your computer is being somewhat dilatory in making this    check you may like to see a printout of the intermediate steps in the        calculation. Use this program and check with n=127 and then, if you have time, with n=521.
  45.  
  46.  
  47. John Greening
  48. 15, Pentland Crescent
  49. Edinburgh, EH10 6NS